

// TurtleSquare.java
import gin.and.tonic.*;
import lejos.nxt.Button;

public class MissionTruck
{

    private DragonRobot robot = new DragonRobot();
    Motor arm = new Motor(MotorPort.A);
    

    MissionTruck()
    {
        //UltrasonicSensor us = new UltrasonicSensor(SensorPort.S1);
        //TouchSensor ts = new TouchSensor(SensorPort.S2);
        
        //robot.addPart(us);
        //robot.addPart(ts);
       
        arm.setSpeed(20);
        robot.addPart(arm);

        /*Mission 3*/
        robot.setTurtleSpeed(50);
        arm.rotateTo(147, true);
        arm.getMot().lock(30);
        robot.forward(500);//051911,let the tail touch the wall//440);//360);
        robot.backward(150);
        arm.rotateTo(15, true);
        arm.getMot().lock(30);
        robot.setTurtleSpeed(60);
        robot.forward(90);
        robot.setTurtleSpeed(70);
        robot.backward(300);
        arm.rotateTo(-165, true);


        

         robot.exit();

    }

   

    public static void main(String[] args)
    {

        new MissionTruck();
    }
}
